<?php 
class BrandModel extends BaseModel {
	public function select_list($map){
		$result = $this->where($map)->order('updateline desc')->findpage('20');
		foreach($result['data'] as $k => &$v){
			$v['brand_ico'] = get_img_url($v['brand_ico']);
		}
		return $result;
	}
	public function add_brand($data){
		$result = D('brand')->add($data);
		if($result){
			return true;
		}else{
			return false;
		}
	}
	public function brand_count($map){
		$map['is_del'] = 0;
		$cou = $this->where($map)->count();
		return $cou;
	}
}
?>